package com.pjbao;


import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

@ComponentScan(basePackages = "com.pjbao")
@SpringBootApplication // 必须标注该注解才能扫描程序里面的注解组件
public class MyApplication implements CommandLineRunner {
    //创建日志打印，前缀统一的字符：
    static Logger logger = LoggerFactory.getLogger("api service v1");

    public void run(String... args) throws Exception {
        logger.info("-->-->-->-->-->-->-->-->欢迎光临 !  Spring Boot 启动完毕....");
    }

    public static void main(String[] args) {
        SpringApplication.run(MyApplication.class);
    }


}